package com.xuxu.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuxu.blog.entity.ArticleEntity;
import com.xuxu.common.utils.PageUtils;
import com.xuxu.common.utils.R;

import java.util.List;
import java.util.Map;

/**
 *
 *
 * @author maxuxu
 * @email maxuxu019@gmail.com
 * @date 2022-08-21 22:22:32
 */
public interface ArticleService extends IService<ArticleEntity> {


    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage2(Map<String, Object> params);

    List<ArticleEntity> queryList();

    R selectArticleByFlag();

    void SaveArticle(ArticleEntity article);

    R queryByAuthor(String author);

    R queryByAuthorCategory(String author, String category);
    // 弃用，使用的是stream流处理。因为涉及到文档所有很大。
    R getCount();

    R getCounts();

    R selectArticleByAuthor(String author, Integer current, Integer size);

    R getTags(String author);

    R selectNewByAuthor(String author);

    R queryPageDesc(String author,String current,String size);

    R querySelfPageDesc(String current, String size);
}

